cmake_minimum_required(VERSION 3.5.2)
project(protobuf3_test)

SET(CMAKE_CXX_STANDARD 11)

# 搜索当前路径下的所有文件赋值给SRC
AUX_SOURCE_DIRECTORY(. SRC)

# 生成名为 Test 的可执行程序
ADD_EXECUTABLE(Test ${SRC}) 


# 指定链接头文件路径
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include)

# 指定链接库路径
TARGET_LINK_DIRECTORIES(Test PRIVATE ${PROJECT_SOURCE_DIR}/lib)

# 链接库到可执行文件
TARGET_LINK_LIBRARIES(Test protobufd)
